package net.ddns.xcyyds.kungfu.procedures;

import net.minecraft.world.phys.Vec3;
import net.minecraft.world.entity.Entity;

public class LLJianQiTickProcedure {
	public static void execute(Entity entity) {
		if (entity == null)
			return;
		entity.setDeltaMovement(new Vec3((entity.getDeltaMovement().x()), (entity.getDeltaMovement().y()), (entity.getDeltaMovement().z())));
		entity.getPersistentData().putDouble("tickTime1", (entity.getPersistentData().getDouble("tickTime1") + 1));
		if (entity.getPersistentData().getDouble("tickTime1") >= 5) {
			if (!entity.level.isClientSide())
				entity.discard();
		}
	}
}
